//
//  EditSeatsCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/11/13.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "EditSeatsCell.h"

@implementation EditSeatsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)addAction:(id)sender {
    NSInteger count = self.itemCountTF.text.integerValue;
    count++;
    self.itemCountTF.text = [NSString stringWithFormat:@"%ld",count];
}


- (IBAction)cutAction:(id)sender {
    NSInteger count = self.itemCountTF.text.integerValue;
    count--;
    
    if (count >=1) {
        self.itemCountTF.text = [NSString stringWithFormat:@"%ld",count];
    } else {
        [SVProgressHUD showErrorWithStatus:@"最小为1"];
        [SVProgressHUD dismissWithDelay:1];
    }
}


- (IBAction)delAction:(id)sender {
    if (self.EditSeatsCellBlock) {
        self.EditSeatsCellBlock(EditSeatsCellActionType_del);
    }
}


@end
